import request from '@/utils/request'
const BASE_API = '/role'

export default {

  //获取所有账户信息
  getAccount(params) {
    return request({
      url: `${BASE_API}/getAccount/${params.page}/${params.pageSize}`,
      method: 'get',
    })
  },

  //添加账户权限信息
  addAccount(data) {
    return request({
      url: `${BASE_API}/addAccount`,
      method: 'post',
      data
    })
  },

  //修改账户信息
  updateAccount(data) {
    return request({
      url: `${BASE_API}/updateAccount`,
      method: 'post',
      data
    })
  },

  //删除账户信息
  deleteAccount(id) {
    return request({
      url: `${BASE_API}/deleteAccount/${id}`,
      method: 'delete',
    })
  },

  //获取admin_role数据库信息
  getRole() {
    return request({
      url: `${BASE_API}/getRole`,
      method: 'get',
    })
  },

  //修改权限信息
  updateRole(data) {
    return request({
      url: `${BASE_API}/updateRole`,
      method: 'post',
      data
    })
  },

 


}